package com.jboost.hyk.common.mapper;

import com.jboost.hyk.common.entity.Business;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jboost.hyk.common.entity.BusinessPoint;
import com.jboost.hyk.common.model.BusinessOverviewVo;

import java.util.Date;
import java.util.List;

/**
 * @Description: 机构
 * @Author: cxn
 * @Date:   2022-10-09
 * @Version: V1.0
 */
public interface BusinessMapper extends BaseMapper<Business> {

    /**
     * 机构消耗知识点额度
     * @param businessId
     * @param num
     */
    void usePoint(String businessId, int num);

    List<BusinessPoint> listValidByBusinessId(String businessId);

    void rechargePoint(String businessId, Integer num);

    void rechargeAccount(String businessId, Integer num);

    void refundAccount(String businessId, Integer num);

    void updateValidEndTime(String businessId, Date endTime);

    void setMajorCount(String businessId, Integer num);

    void subMajorCount(String businessId, Integer num);

    BusinessOverviewVo countStudentBy(String businessId, Date start, Date end);
}
